#!/usr/bin/env bash
BG_TILE="--bg-tile"
BG_CEN="--bg-center"
BG_SCA="--bg-scale"
USAGE="Setting background:\n-t tiled\n-c center\n-s scaled\nsecond arg should be a pic"
#
if [ "$1" = "-t" ]
   then feh $BG_TILE $2 

elif [ "$1" = "-c" ]
   then feh $BG_CEN $2 

elif [ "$1" = "-s" ]
   then feh $BG_SCA $2 

else
   echo -e $USAGE
fi 

if [ ! -e "$2" ]       # Check if file exists.
   then
      echo "Are you sure you typed the filename correctly?"
fi
